﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleRayTracer
{
    abstract class Object3D
    {

        internal Vector3D scale;
        internal double clR = 0;
        internal double clG = 0;
        internal double clB = 0;

        public static double Sqr(double x)
        {
            return x * x;
        }

        // interfaces
        public abstract bool IsIntersect(Ray ray);
        public abstract bool GetIntersect(Ray ray, ref double distance);
        public abstract Vector3D GetNormal(Vector3D point);

        public abstract void Move(Vector3D trans, Vector3D centre);
        public abstract void MoveTo(Vector3D dest, Vector3D centre);
        public abstract void RotX(double angle, Vector3D centre);
        public abstract void RotY(double angle, Vector3D centre);
        public abstract void RotZ(double angle, Vector3D centre);
    }
}
